﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace HowItWentDown
{
    public class SpriteBatchEffects : Effect
    {
        public Matrix Transform;
        public RenderTarget2D DepthTexture;
        public SpriteBatchEffects(GraphicsDevice device)
            :base(Global.LoadEffect("SpriteBatchShader"))
        {
            CurrentTechnique = Techniques["Blur"];
        }
        protected override void OnApply()
        {
            //Parameters["BlurTexture"].SetValue(BlurTexture);
            Parameters["MatrixTransform"].SetValue(Matrix.CreateTranslation(-0.5f, -0.5f, 0) * Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, 1));
            Parameters["DepthTexture"].SetValue(DepthTexture);
            base.OnApply();
        }
    }
}
